Skip to content

adding verbose mode, readme info for environment, and cleanup - #118

Open
sam1el wants to merge 6 commits into
mainfrom
feat/dry-run
Open

adding verbose mode, readme info for environment, and cleanup#118
sam1el wants to merge 6 commits into
mainfrom
feat/dry-run

Conversation

@sam1el

@sam1el sam1el commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves the org project cycle script so large and automation-heavy runs are safer, clearer, and faster: preview without writes, better observability, optional “activate only inactive” mode, an extra SCM origin, and thread-pool workers for parallel API calls.

Note: The branch is named feat/dry-run, but the change set is broader (UX + scale for the same tool), not only dry-run.

What changed

  • --dry-run — List orgs, filters, and the projects that would be cycled (or activated) without calling deactivate/activate.
  • -v / --verbose — Extra logging (environment URLs, org visibility, per-request details).
  • README — Reworked quick start, cheat sheet table, region/environment, auth, and large-org notes (includes --workers, OAuth vs token, FedRAMP reminder).
  • --activate-inactive-only — Skip the deactivate pass; only activate projects that are already inactive (re-monitor).
  • Origins — Support github-cloud-app as an import origin (alongside e.g. github, gitlab).
  • --workers N — Parallel deactivate/activate via a thread pool (1–64); when > 1, requires credentials in the environment (no interactive token prompt). yaspin added for progress in parallel runs.
  • Tooling — Local .vscode/settings.json in the subfolder (editor defaults for this project).

Files

  • deactivate-reactivate/main.py — CLI flags, dry-run/verbose/parallel paths, github-cloud-app in origin help.
  • deactivate-reactivate/README.md — User-facing documentation aligned with the new flags.
  • deactivate-reactivate/requirements.txt — New dependencies for the updated script.

How to test

  1. pip install -r deactivate-reactivate/requirements.txt
  2. python3 main.py --orgs <slug> --dry-run and confirm listed orgs/projects and no writes.
  3. python3 main.py --orgs <slug> --dry-run -v and confirm verbose output.
  4. Optional: --origins github github-cloud-app / --activate-inactive-only / --workers 4 with SNYK_TOKEN (or OAuth) in the environment.

@sam1el
sam1el requested a review from a team as a code owner April 23, 2026 13:47
@Robthreefold

Robthreefold commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants